package com.edu.whty.service;

import com.edu.whty.entity.capacity.Capacity;

import java.util.List;

public interface DiskCapacityService {

    /**
     * 查询列表
     * @param model
     * @return
     * @throws Exception
     */
    List<Capacity> selectList(Capacity model) throws Exception;

    /**
     * 查询单条记录
     * @param capacityId
     * @return
     * @throws Exception
     */
    Capacity selectOne(String capacityId) throws Exception;

    /**
     * 更新
     * @param model
     * @throws Exception
     */
    void updateOne(Capacity model) throws Exception;

    /**
     * 批量更新
     * @param list
     * @throws Exception
     */
    void updateBatch(List<Capacity> list) throws Exception;

    /**
     * 插入
     * @param model
     * @throws Exception
     */
    void insertOne(Capacity model) throws Exception;
    /**
     * 批量插入
     * @param list
     * @throws Exception
     */
    void insertBatch(List<Capacity> list) throws Exception;

    /**
     * 删除
     * @param capacityId
     * @throws Exception
     */
    void deleteOne(String capacityId) throws Exception;

    /**
     * 更新网盘使用量
     * @param ownerId
     * @throws Exception
     */
    void updateUsed(String ownerId) throws Exception;

    /**
     * 批量更新网盘使用量
     * @param list
     * @throws Exception
     */
    void updateUsedBatch(List<String> list) throws Exception;

    /**
     * 更新机构网盘使用量
     * @param orgId
     * @throws Exception
     */
    void updateOrgUsed(String orgId) throws Exception;

    /**
     * 获取分配给老师的总容量
     * @param orgId
     * @return
     * @throws Exception
     */
    Long selectTeachersCapacity(String orgId) throws Exception;

    void updateDiskCapacity(Capacity capacity, Long fileLength, String updateType) throws Exception;
}
